<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //编写一个查询桃子和苹果价格的程序，要求用户输入桃子或苹果的个数，然后输出相应的价格。假设每斤桃子2.5元，每斤苹果3元。  
        var peachPrice = 2.5; // 每斤桃子价格
        var applePrice = 3; // 每斤苹果价格
        var peachQuantity = parseFloat(prompt("请输入桃子的个数："));
        var appleQuantity = parseFloat(prompt("请输入苹果的个数："));
        var totalPeachPrice = peachPrice * peachQuantity;
        var totalApplePrice = applePrice * appleQuantity;
        document.write("桃子价格：" + totalPepiceice + "元<br>");
        document.write("苹果价格：" + totalApplePrice + "元");
    </script>
</body>

</html>